package top.xiaoazi.futureletterserver.utils;

public class RedisKeyUtils {
    /**
     * 返回 csdn脚本，阅读模块，建议阅读的文章 redis key
     * @param userId
     * @return
     */
    public static String getCsdnScriptReadSuggestKey(Integer userId) {
        // csdn脚本，阅读模块，建议阅读的文章redis key
        String csdnScriptReadSuggestKey = "CSDN_SCRIPT_READ_SUGGEST_KEY";
        return csdnScriptReadSuggestKey + "." + userId;
    }
    /**
     * 返回防抖key
     * @param userId
     * @return
     */
    public static String getCsdnScriptAntiShakeKey(Integer userId) {
        String getCsdnScriptAntiShakeKey = "CSDN_SCRIPT_ANTI_SHAKE_KEY";
        return getCsdnScriptAntiShakeKey + "." + userId;
    }

    /**
     * 广告列表key
     * @return
     */
    public static String getPopularizeListKey() {
        return "POPULARIZE_LIST_REDIS_KEY";
    }

    /**
     * 验证码key
     * @return
     */
    public static String getVerifyCodeListKey() {
        return "VERIFY_CODE_LIST_REDIS_KEY";
    }

    /**
     * 允许用户重置密码key
     * @return
     */
    public static String getRestPasswordKey(String username) {
        return "REST_PASSWORD_KEY" + username;
    }

    /**
     * 重置密码的邮箱 key
     * @return
     */
    public static String getRestPasswordEmailKey(String email) {
        return "REST_PASSWORD_EMAIL_KEY" + email;
    }
}
